public class TestDemo2 {
    public static void main(String[] args) {
        System.out.println("10的阶乘："+ret(10));
    }

    public static int ret(int num) {
        if (num == 0) {
            return 1;
        } else {
            int i = num * ret(num - 1);
            return (num * ret(num - 1));
        }
    }
}
